
from http://blog.andreloker.de/post/2008/06/Post-Redirect-Get.aspx
// After the POST at the server,
header("Location: " . $_SERVER['REQUEST_URI']); // Or other content as the result of the POST request
// When 'refresh' is clicked, the browser will send GET with the URI to the server, and
// the server script of the URI sends HTML content or data
'SignIn':
...
// include 'view_mainpage.php'; // Instead of this
header('Location: view_mainpage.php'); // The browser will see 'view_mainpage.php' as a new page. The problem is that the session will be broken.